package com.projects.android.adapters;

import android.view.View;
import android.widget.TextView;

import com.projects.android.R;
import com.projects.android.utils.Utils;

public class ManageOrderDetailsViewHolder {
	private View mRow;
	private TextView Food = null;
	private TextView Quantity = null;
	private TextView Price = null;

	public ManageOrderDetailsViewHolder(View row) {
		mRow = row;
	}

	public TextView getFood() {
		if (null == Food) {
			Food = (TextView) mRow.findViewById(R.id.lblOrderDetailFood);
			Food.getLayoutParams().width = Utils.SCREEN_WIDTH  / 2;
		}
		return Food;
	}
	
	public TextView getQuantity() {
		if (null == Quantity) {
			Quantity = (TextView) mRow.findViewById(R.id.lblOrderDetailQuantity);
			Quantity.getLayoutParams().width = Utils.SCREEN_WIDTH  / 4;
		}
		return Quantity;
	}
	
	public TextView getPrice() {
		if (null == Price) {
			Price = (TextView) mRow.findViewById(R.id.lblOrderDetailPrice);
			Price.getLayoutParams().width = Utils.SCREEN_WIDTH  / 4;
		}
		return Price;
	}
}
